import { Toast } from "vant";

export default function () {
  const publicRefresh = async (callback, params) => {
    const data = await callback(params);
    Toast("刷新成功");
    return data;
  };

  const publicLoad = async (callback, params) => {
    const data = await callback(params);
    return data;
  };

  return {
    publicRefresh,
    publicLoad,
  };
}
